{% extends "base.html" %}
{% block head %}
<title>{{cat_info["name"]}} - 咩乐购物!</title>
<meta name="keywords" content="{{cat_info["name"]}}，逛淘宝，淘宝精选，热门推荐，新品推荐，夏衣新款，衬衫，网上购物" />
<meta name="description" content="{{cat_info["name"]}}，淘宝商品太多？找不到自己喜欢的宝贝？快来咩乐！千位淘宝资深买家为你精选时尚潮品！" />
{% end %}
<!-- content -->
{% block content %}

<div class="topCate col4 clearfix">
{% from urllib import quote %}
{% for val in tag %}
<dl>
<dt>{{val["name"]}}</dt>
<dd class="clearfix">
{% for v in val["item"] %}
<a href="/{{cat}}/{{quote(v["name"])}}"><span>{{v["name"]}}<i></i></span></a>
{% end %}
</dd>
</dl>
{% end %}

</div>

<div id="cat_nav" class="mt10 clearfix">
	<div class="title left mr20"><h1 class="green f18">{{cat_info["name"]}}</h1></div>

	<div class="left"><span class="sort_span">排序：</span><ul class="left">
                    <li class="category_sort_l">
                        <a class="c" href="?order=hot{% if price!='0'%}&price={{price}}{% end %}">
                            <i></i>
                            <span title="潮流" {% if order_by=='volume'%}class="bc"{% end %}>潮流</span>
                        </a>
                    </li>
                    <li class="category_sort_r">
                        <a class="c" href="?order=new{% if price!='0'%}&price={{price}}{% end %}">
                            <span title="最新" {% if order_by=='id'%}class="bc"{% end %}>最新</span>
                            <i></i>
                        </a>
                    </li>
					<!--
                    <li class="category_sort_r" style="margin-left:-1px;">
                        <a class="" href="?order=hot">
                            <span title="最热">最热</span>
                            <i></i>
                        </a>
                    </li>-->
                </ul>
			</div>
			
			<div class="left ml20"><span class="sort_span">价格：</span><ul class="left">
                    <li class="category_sort_l">
                        <a class="c" href="{% if order_by=='volume'%}/{{cat_info["key"]}}/{% else %}?order=new{% end %}">
                            <i></i>
                            <span title="全部" {% if price=='0'%}class="bc"{% end %}>全部</span>
                        </a>
                    </li>
                    <li class="category_sort_c">
                        <a class="c" href="?price=1{% if order_by=='id'%}&order=new{% end %}">
                            <span title="100元以下" {% if price=='1'%}class="bc"{% end %}>100元</span>
                            <i></i>
                        </a>
                    </li>
					 <li class="category_sort_c">
                        <a class="" href="?price=2{% if order_by=='id'%}&order=new{% end %}">
                            <span title="100元至200元" {% if price=='2' %}class="bc"{% end %}>200元</span>
                            <i></i>
                        </a>
                    </li>
					 <li class="category_sort_c">
                        <a class="" href="?price=3{% if order_by=='id'%}&order=new{% end %}">
                            <span title="200元至500元" {% if price=='3'%}class="bc"{% end %}>500元</span>
                            <i></i>
                        </a>
                    </li>
                    <li class="category_sort_r" style="margin-left:-1px;">
                        <a class="" href="?price=4{% if order_by=='id'%}&order=new{% end %}">
                            <span title="500元以上" {% if price=='4'%}class="bc"{% end %}>更高</span>
                            <i></i>
                        </a>
                    </li>
                </ul>
			</div>
			

</div>

<div class="clearfix mt10" id="waterfall">
<div id="col1" class="col clearfix">
{% for val in  item[0:3]%}
{% module Item(val)%}
{% end %}
</div>

<div id="col2" class="col clearfix">
{% for val in  item[3:6]%}
{% module Item(val)%}
{% end %}
</div>
<div id="col3" class="col clearfix">
{% for val in  item[6:9]%}
{% module Item(val)%}
{% end %}
</div>

<div id="col4" class="col mr0 clearfix">
{% for val in  item[9:12]%}
{% module Item(val)%}
{% end %}
</div>
</div>
</div>

<div id="page_loading">数据正在加载中....</div>

<div class="page hide" id="page"><span class="disabled"> <  上一页</span><span class="current">1</span><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">6</a><a href="#">7</a>...<a href="#">199</a><a href="#">200</a><a href="#">下一页  > </a></div>

<script>
var page = "{{page}}";
var category = "{{cat}}";
var price = "{{price}}";
var order = "{{order_by}}";
$(function() {
	waterfall.start('/ajax/shares.json?r='+Math.random()+'&category='+category+"&page="+page+"&order="+order+"&price="+price);
});
</script>

{% end %}